/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By 深圳中科鑫智科技有限公司
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.business.service.shop;

import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.shop.cereshop.business.page.group.GroupDetail;
import com.shop.cereshop.business.page.order.Product;
import com.shop.cereshop.business.param.group.*;
import com.shop.cereshop.business.param.product.ProductGetGroupParam;
import com.shop.cereshop.business.param.shop.CereShopGroupParam;
import com.shop.cereshop.commons.domain.business.CerePlatformBusiness;
import com.shop.cereshop.commons.domain.common.Page;
import com.shop.cereshop.commons.domain.shop.CereShopGroup;
import com.shop.cereshop.commons.domain.shop.vo.CereShopGroupVo;
import com.shop.cereshop.commons.exception.CoBusinessException;
import org.assertj.core.util.Lists;
import org.springframework.beans.BeanUtils;

import java.util.List;

public interface CereShopGroupService extends IService<CereShopGroup> {


    /**
     * 条件构造器
     */
     LambdaQueryWrapper<CereShopGroup> buildLambdaQueryWrapper(CereShopGroupParam param);

    /**
     * 条件查询
     */
     List<CereShopGroupVo> queryList(CereShopGroupParam param);

    /**
     * 转换函数
     */
     List<CereShopGroupVo> generate(List<CereShopGroup> list);

    /**
     * 转换函数
     */
     CereShopGroupVo generate(CereShopGroup group);




    ////////////////////////////////////////////////////////////////////////////////////////
    List<CereShopGroup> getGroupSelect(ProductGetGroupParam param) throws CoBusinessException;

    void save(ShopGroupSaveParam group, CerePlatformBusiness user) throws CoBusinessException;

    void update(ShopGroupUpdateParam group, CerePlatformBusiness user) throws CoBusinessException;

    void delete(GroupDeleteParam param, CerePlatformBusiness user) throws CoBusinessException;

    GroupDetail getById(Long shopGroupId) throws CoBusinessException;

    Page getAll(GroupGetAllParam param) throws CoBusinessException;

    Page getProducts(GroupProductParam param) throws CoBusinessException;

    List<Product> getProductIds(ShopGroupSaveParam group) throws CoBusinessException;
}
